<template>
  <view class="content">
    <view class="top_view">请选择你的问题反馈点</view>
    <view @click="detailBtn(item.name, item.id)" class="cell_view" v-for="(item, index) in datas" :key="index">
      <view class="left_view">{{ item.name }}</view>
       <u-icon name="arrow-right" size="32rpx" color="#333"></u-icon>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      datas: [
        { name: '功能异常:  功能故障或不可用', id: 1 },
        { name: '产品建议:  用的不爽,我有建议', id: 2 },
        { name: '安全问题:  密码/隐私/欺诈等等', id: 3 },
        { name: '其他问题', id: 4 },
      ],
      type: 1,
    }
  },
  onLoad(option) {
  },
  methods: {
    async fetch(type) {
      uni.showLoading({
        title: '加载中',
      })
      const res = await getQueryFeedbackCatagory(type)
      console.log(JSON.stringify(res))
      if (res.code == 200) {
        this.datas = res.result
        console.log(this.datas)
        uni.hideLoading()
      } else {
        uni.showToast({
          title: '请求出错',
          icon: 'none',
        })
        uni.hideLoading()
      }
    },
    detailBtn(name, cid) {
      uni.navigateTo({
        url: '/pages/user/setting/feedbackdetail?name=' + name + '&cid=' + cid,
      })
    },
  },
}
</script>
<style lang="scss">
.content {
  .top_view {
    width: 100%;
    background-color: #f5f5f5;
    font-size: 30rpx;
    line-height: 92rpx;
    color: #999;
    text-align: center;
  }
  .cell_view {
    margin: 0 52rpx;
    width: calc(100% - 104rpx);
    height: 116rpx;
    border-bottom: 1rpx solid #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .left_view {
      font-size: 30rpx;
      font-weight: 500;
      color: #333;
    }

    .right_icon {
      font-size: 32rpx;
      font-weight: bold;
    }
  }
}
</style>
